perf: add a persistant systemd DHT node - #34
Open
jaja360 wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces significant improvements to how
dpasteinteracts with OpenDHT, providing a more robust and efficient DHT proxy setup. The main changes include adding support for an optional persistent local OpenDHT proxy via a systemd user unit, updating documentation and configuration to reflect this, and refactoring HTTP client interactions to use a new JSON-based API with base64 encoding. Additionally, installation scripts are updated to install the new systemd unit.DHT Proxy Integration and Systemd Unit:
dpaste-dhtnode.servicesystemd user unit to run a persistent local OpenDHT proxy, and updated installation scripts (CMakeLists.txt,Makefile.am) to install this unit. [1] [2] [3] [4]README.mdanddoc/dpaste.1to describe how to enable and use the systemd DHT proxy, and clarified the configuration file'shostandportsettings. [1] [2]Configuration and Documentation Updates:
config/dpaste.confto clarify that thehostandportrefer to the OpenDHTDhtProxyServerendpoint.Codebase Changes for Proxy Support:
Binclass insrc/bin.cpp/src/bin.hto only start a local DHT node if the proxy is unavailable, avoiding unnecessary node startups. IntroducedensureNodeRunning()and anode_running_flag. [1] [2] [3] [4] [5]HTTP Client Refactoring:
HttpClientinsrc/http_client.cppto use a new JSON API for the proxy, including base64 encoding/decoding for data transmission, and improved error handling and compatibility with the proxy server. [1] [2] [3]These changes collectively improve performance, reliability, and usability for users who wish to run a persistent DHT proxy, and modernize the client-server communication protocol.